package Tools;

import java.util.Random;

/**
 * @author 23083
 */
public class Generator {
    private final Random random = new Random();
    public String generateAdd(int rough){
        //运算数i，j
        int i,j;
        i = random.nextInt(rough);
        j = random.nextInt(rough);
        return i+"+"+j+"=";
    }
    public String generateSubtract(int rough){
        //运算数i，j
        int i,j;
        i = random.nextInt(rough);
        j = random.nextInt(rough);
        return i+"-"+j+"=";
    }
    public String generateMultiply(int rough){
        //运算数i，j
        int i,j;
        i = random.nextInt(rough);
        j = random.nextInt(rough);
        return i+"*"+j+"=";
    }
    public String generateDivide(int rough){
        //运算数i，j.
        int i,j;
        i = random.nextInt(rough);
        j = random.nextInt(rough-1)+1;
        return i+"÷"+j+"=";
    }
}
//13